package com.zh.search.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * 搜索结果排序字段枚举
 */
@Getter
public enum SortField {

    ID("id", "多媒体id"),
    UPDATE_TIME("updateTime", "更新时间"),
    PRAISE("praiseCount", "点赞数"),
    SHARE("shareCount", "分享数"),
    VIEW("viewCount", "浏览数"),
    COLLECT("collectCount", "收藏量");
    @EnumValue
    @JsonValue
    private final String field;
    private final String desc;

    SortField(String field, String desc) {
        this.field = field;
        this.desc = desc;
    }
}
